import { Injectable } from '@nestjs/common';
import { CrudService } from '../../common/crud/crud.service';
import { PrismaService } from 'nestjs-prisma';

@Injectable()
export class SizeService extends CrudService {
  constructor(readonly prisma: PrismaService) {
    super(prisma, 'size');
  }

  delete(id: string) {
    return this.prisma.size.update({
      where: {
        id,
      },
      data: {
        isDelete: true,
      },
    });
  }
}
